package com.gable.exhibition.dao;

import com.gable.exhibition.model.Manufacturer;
import com.gable.exhibition.view.MaintainerView;
import com.gable.exhibition.view.ManufacturerView;
import com.gable.exhibition.view.RepairManufacturerView;
import com.gable.exhibition.view.SupplierView;

import java.util.List;
import java.util.Map;

public interface ManufacturerDao {
    int deleteByPrimaryKey(Long manufacturerId);

    int insert(Manufacturer record);

    int insertSelective(Manufacturer record);

    Manufacturer selectByPrimaryKey(Long manufacturerId);

    int updateByPrimaryKeySelective(Manufacturer record);

    int updateByPrimaryKey(Manufacturer record);

    /**
     * 获取厂商列表，用于下拉框显示
     * @Create user jacky
     * @Create date 2018/2/6
     * @return
     */
    List<Manufacturer> queryManufacturer(Map map);

    /**
     * 获取厂商总数,用于分页
     * @param manufacturerView
     * @Create user jacky
     * @Create date 2018/2/8
     * @return
     */
    int queryManufacturerCount(ManufacturerView manufacturerView);

    /**
     * 获取厂商列表
     * @param manufacturerView
     * @Create user jacky
     * @Create date 2018/2/8
     * @return
     */
    List<ManufacturerView> queryManufacturerList(ManufacturerView manufacturerView);

    /**
     * 判断厂商名称是否存在
     * @Create user jacky
     * @Create date 2018/2/9
     * @return
     */
    int checkManufacturerNo(ManufacturerView manufacturerView);

    /**
     * 获取厂商详情
     * @param manufacturerId
     * @Create user jacky
     * @Create date 2018/2/9
     * @return
     */
    ManufacturerView queryManufacturerInfo(Long manufacturerId);

    /**
     * 根据维修商id获取该维修商的厂商信息
     * @param maintainerId
     * @Create user jacky
     * @Create date 2018/2/26
     * @return
     */
    List<ManufacturerView> queryManufacturerListBymainId(Long maintainerId);

    /**
     * 根据设备ID查询厂商设备信息
     * @param deviceId
     * @return
     */
    RepairManufacturerView queryManufacturerByDeviceId(Long deviceId);

    /**
     * 根据维修商id获取该维修商的厂商信息
     * @param supplierId
     * @Create user jacky
     * @Create date 2018/3/16
     * @return
     */
    List<ManufacturerView> queryManufacturerListBySuppId(Long supplierId);

    /**
     * 查询厂商信息
     * @param manufacturer
     * @return
     */
    Manufacturer checkManufacturer(Manufacturer manufacturer);

    List<ManufacturerView> queryManufacturers(Map map);
}